<admintpl file="header" />
</head>
<body>
	<div class="wrap js-check-wrap">
		<ul class="nav nav-tabs" style="margin-bottom:5px;">
			<li class="active"><a href="{:U('Wechat/AdminSpecialmenu/menu_index', array('catid' => $catid))}">个性化菜单</a></li>
			<li><a href="{:U('Wechat/AdminSpecialmenu/menu_add', array('catid' => $catid))}">添加菜单</a></li>
		</ul>
		<form id="111" action="{:U('Wechat/AdminSpecialmenu/menu_listorders')}" method="post" class="form-horizontal js-ajax-forms">
			<div class="table-actions" style="float:right;margin-right:10px;">
				<a href="{:U('Wechat/AdminSpecialmenu/delmenu', array('catid' => $catid))}" class="btn btn-warning btn-small">删除微信端个性化菜单</a>
				<a href="{:U('Wechat/AdminSpecialmenu/makemenu', array('catid' => $catid))}" class="btn btn-info btn-small">生成微信端个性化菜单</a>
			</div>
			<table class="table table-hover table-bordered table-list">
				<thead>
					<tr>
						<th width="60">{:L('SORT')}</th>
						<th width="120">名称</th>
						<th>类型</th>
						<th>内容</th>
						<th>显示</th>
						<th>{:L('ACTIONS')}</th>
					</tr>
				</thead>
				<tbody>
					{$taxonomys}
				</tbody>
			</table>
			<div class="form-actions">
				<button class="btn btn-primary js-ajax-submit" type="button">{:L('SORT')}</button>
			</div>
		</form>
	</div>
	<script type="text/javascript" src="__PUBLIC__/js/common.js"></script>
	<script type="text/javascript">
	$(function() {
		Wind.use('ajaxForm', function() {
			var form = $('form.js-ajax-forms');
			var formloading = false;
			$('.js-ajax-submit').on('click', function() {
				form.ajaxSubmit({
					url : form.attr('action'), //按钮上是否自定义提交地址(多按钮情况)
					dataType : 'json',
					beforeSubmit : function(arr, $form, options) {
						formloading = true;
					},
					success : function(data, statusText, xhr, $form) {
						formloading = false;
						if (data.status) {
							
							//成功
							Wind.use("artDialog", function() {
								art.dialog({
									id : "succeed",
									icon : "succeed",
									fixed : true,
									lock : true,
									background : "#CCCCCC",
									opacity : 0,
									content : data.info,
									button : [ {
										name : '排序成功',
										callback : function() {
											reloadPage(window);
											return true;
										},
										focus : true
									}]
								});
							});
						} else {
							error(data.info);
						}
					}
				});
			})
		});
	})
	</script>
</body>
</html>